<?php
/**
 * Created by PhpStorm.
 * User: 颖inv
 * Date: 2016/9/28
 * Time: 17:18
 */
header('Content-type:text/html;charset=utf-8');
?>
<!doctype html>
<html>
   <head>
       <meta charset="UTF-8">
       <title>判断是否为闰年</title>
       <style>
          body{background-color:#DADADA;}
          .box{width: 360px; height: 180px; border: solid 1px #eeeeee; padding: 10px;
             background-color: white;}
          h2,p{text-align: center;}

       </style>
   </head>
   <body>
      <div class="box">
            <?php
            $year=2015;
            $result=(($year%4==0)&&($year%100!=0)||($year%400==0))?'是闰年':'不是闰年';
            echo '<h2>闰年的判断</h2>';
            echo '<p>输入的年份:'.$year;
            echo '<input type="text" name="$year" value="" class="">';
            echo '<p>判断的结果:'.$year.'年'.$result;
            ?>

      </div>
   </body>
</html>
